#include "Key.h"

void Key_init()
{
    GPIO_PIN_INIT();
}

#define DOWN 0  
#define UP   1
u8 last_key = UP;
void KEY_scan()
{
    //当前按下，刚刚是抬起
    if(KEY == DOWN && last_key == UP)
    {
        last_key = DOWN;
        Key_on_keydown();
    }
    else if(KEY == UP && last_key == DOWN)
    {
        last_key = UP;
        Key_on_keyup();
    }
    

    //当前抬起，刚刚是按下
}

//void Key_on_keydown(){}
//void Key_on_keyup(){}
